//
//  LJHColCollectionViewCell.m
//  HEARME
//
//  Created by 曲政永 on 16/1/24.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "LJHColCollectionViewCell.h"
#import "UIImageView+WebCache.h"
@interface LJHColCollectionViewCell ()
@property(nonatomic,retain)UIImageView *imvCate;
@property(nonatomic,retain)UILabel *lableCate;
@end

@implementation LJHColCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self createCell];
    }
    return self;
}
-(void)createCell
{
    self.imvCate = [[UIImageView alloc]initWithFrame:CGRectMake(10, self.contentView.frame.origin.y, 50, 50)];
    [self.contentView addSubview:self.imvCate];
//    self.imvCate.backgroundColor = [UIColor redColor];
    
    self.lableCate = [[UILabel alloc]initWithFrame:CGRectMake(60, self.contentView.frame.origin.y, 120,50 )];
    [self.contentView addSubview:self.lableCate];
    //    self.nameLable.alpha = 0.5;
    
}
-(void)setCateModel:(LJHCateModel *)cateModel
{
    if (_cateModel!=cateModel) {
        [_cateModel release];
        _cateModel = [cateModel retain];
        
    }
    NSURL *urlIma = [NSURL URLWithString:_cateModel.coverPath];
    [self.imvCate sd_setImageWithURL:urlIma placeholderImage:[UIImage imageNamed:@"1024.jpg"]];
    self.lableCate.text = _cateModel.title;
    
}
@end
